cmake_minimum_required(VERSION 3.10)

project(app C CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(root ${CMAKE_CURRENT_LIST_DIR})
set(CMAKE_PREFIX_PATH "I:\\cmake") # /soil2;I:\\cmake/glm ;I:/cmake/sfml/lib/cmake
set(SFML_STATIC_LIBRARIES ON)

include_directories("${root}/include")
set(EXECUTABLE_OUTPUT_PATH  ${CMAKE_CURRENT_LIST_DIR}/bin)

set(dependencies "soil2;glm;OpenGL")
foreach(d ${dependencies})
find_package(${d} REQUIRED)
endforeach()


find_package(SFML COMPONENTS Graphics Window System REQUIRED)

aux_source_directory("${root}/src" srcs)
add_executable(${PROJECT_NAME} main.cpp ${srcs})
target_link_libraries(${PROJECT_NAME} 
    SFML::Graphics SFML::Window SFML::System
    soil2::soil2 glm::glm
    opengl32
)